﻿using UnityEngine;
using System.Collections;

namespace BehaviorSystem
{
    public class ComponentBase : MonoBehaviour, IBehaviourComponent
    {
        IBehaviorAgent agent;
        public IBehaviorAgent Agent
        {
            get
            {
                if (agent == null)
                {
                    agent = GetComponent<BehaviourAgent>();
                }
                return agent;
            }
        }
    }
}